<?php
use yii\bootstrap\ActiveForm;
use yii\helpers\Html;
use yii\helpers\Url;

?>

<?= $this->render('header'); ?>
<style>
	@media (min-width: 992px) and (max-width: 1439px){
		#basic .info{padding-left: 29.3%;}
		.select{width: 200px;}
		#basic .info .inputs .inputs-list:nth-child(2n) {
			margin-right: 0!important;
		}
		#basic .info .inputs .inputs-list:nth-child(3n){margin-right: 100px;}
	}
</style>

<div id="basic" class="container">

	<?php ActiveForm::begin([
		'options' => ['class' => 'jl_form']
	]);?>
		<div class="clearfix mt20 info">
			<img class="pics" src="<?= Yii::getAlias('@web/backend/img/member/avatar.png') ?>">
			<div class="inputs clearfix">
				<div class="inputs-list">
					<label>姓名</label><?= Html::activeTextInput($model, 'member_name') ?>
				</div>
				<div class="inputs-list">
					<label>手机号</label><?= Html::activeTextInput($model, 'member_mobile') ?>
				</div>
				<div class="inputs-list">
					<label>性别</label>
					<div class="select pull-right">
						<?= Html::activeDropDownList($model, 'member_sex', [
							'0' => '女',
							'1' => '男'
						]) ?>
					</div>
				</div>
				<div class="inputs-list">
					<label>生日</label><?= Html::activeTextInput($model, 'member_birthday', [
						'class' => 'laydate-icon',
						'onclick' => 'laydate()'
					]) ?>
				</div>
				<div class="inputs-list">
					<label>职业</label><?= Html::activeTextInput($model, 'member_job') ?>
				</div>
				<div class="inputs-list">
					<label>婚姻</label>
					<div class="select pull-right">
						<?= Html::activeDropDownList($model, 'marriage', [
							'1' => '已婚',
							'0' => '未婚'
						]) ?>
					</div>
				</div>
				<div class="inputs-list">
					<label>地址</label><?= Html::activeTextInput($model, 'address') ?>
				</div>
			</div>
		</div>

		<textarea name="BusMember[member_remark]" placeholder="请输入对该会员的备注信息。"><?= $model->member_remark ?: '' ?></textarea>
		<div class="text-center mt20">
			<a  class="btnBg dis text-center  " style=" height: 40px;overflow: hidden;">
				<input  type="submit" value="保存"  style="display: block; width: 100%; background: 0; border:0;line-height: 40px;">
			</a>
		</div>
	<?php ActiveForm::end() ?>

</div>

<?php $this->beginBlock('js_index') ?>

<?php
	$session = Yii::$app->getSession();
	if ($session->hasFlash('success')) {
		echo "layer.confirm('" . $session->getFlash('success') . "', {icon:1,btn: ['返回列表','继续编辑']},function(index){
			location.href = 'index';
		},function(){
			var aa = ". Yii::$app->request->get('id') .";
			location.href = 'constitution?id='+aa;

		})";
	}
?>

<?php $this->endBlock() ?>
<?php $this->registerJs($this->blocks['js_index'], $this::POS_END); ?>

<?php $this->registerJsFile("@web/system/member/basic.js",['position'=>$this::POS_END]);?>